# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Domains.V1.Model.ConfigureDnsSettingsRequest do
  @moduledoc """
  Request for the `ConfigureDnsSettings` method.

  ## Attributes

  *   `dnsSettings` (*type:* `GoogleApi.Domains.V1.Model.DnsSettings.t`, *default:* `nil`) - Fields of the `DnsSettings` to update.
  *   `updateMask` (*type:* `String.t`, *default:* `nil`) - Required. The field mask describing which fields to update as a comma-separated list. For example, if only the name servers are being updated for an existing Custom DNS configuration, the `update_mask` is `"custom_dns.name_servers"`. When changing the DNS provider from one type to another, pass the new provider's field name as part of the field mask. For example, when changing from a Google Domains DNS configuration to a Custom DNS configuration, the `update_mask` is `"custom_dns"`. //
  *   `validateOnly` (*type:* `boolean()`, *default:* `nil`) - Validate the request without actually updating the DNS settings.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dnsSettings => GoogleApi.Domains.V1.Model.DnsSettings.t() | nil,
          :updateMask => String.t() | nil,
          :validateOnly => boolean() | nil
        }

  field(:dnsSettings, as: GoogleApi.Domains.V1.Model.DnsSettings)
  field(:updateMask)
  field(:validateOnly)
end

defimpl Poison.Decoder, for: GoogleApi.Domains.V1.Model.ConfigureDnsSettingsRequest do
  def decode(value, options) do
    GoogleApi.Domains.V1.Model.ConfigureDnsSettingsRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Domains.V1.Model.ConfigureDnsSettingsRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
